/**
 * Created with IntelliJ IDEA.
 * User: ajhin
 * Date: 4/12/14
 * Time: 12:25 PM
 * To change this template use File | Settings | File Templates.
 */
package societyGames.codeAlong.model
{
import societyGames.xmlFragment.XMLFragment;

public class Solution extends XMLFragment
{
  override protected function getDefaultXML():XML
  {
    return _defaultXML;
  }

  public function get id():String
  {
    return _xml.@id;
  }

  [Bindable]
  public function set id(value:String):void
  {
    _xml.@id = value;
  }

  public function get code():String
  {
    return _xml.code[0].toString();
  }

  [Bindable]
  public function set code(value:String):void
  {
    _xml.code[0].setChildren(value);
  }

  private const _defaultXML:XML =
          <solution id="0">
            <code></code>
          </solution>;
}
}
